﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter08.Code02
{
    public class Cow : Animal, IConsume
    {
        private Udder containeUdder;
        private int weight;

        public int Weight
        {
            get { return weight; }
            set { weight = value; }
        }

        public void Moo()
        {

        }

        public Cow()
        {

        }

        public Cow(Udder udder)
        {
            containeUdder = udder;
        }

        public void SupplyMilk()
        {
            if (containeUdder != null)
            {
                containeUdder.Milk();
            }
        }

        public override void EatFood()
        {

        }

        public override void Bread()
        {

        }

        public void Milk()
        {

        }

        public static bool operator >(Cow op1, Cow op2)
        {
            return op1.Weight > op2.Weight;
        }

        public static bool operator <(Cow op1, Cow op2)
        {
            return op1.Weight < op2.Weight;
        }
    }
}
